package com.eastfair.venueservice.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.database.mybatis.typehandler.M9EncryptHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 评价投诉记录
 * </p>
 *
 * @author lyw
 * @since 2023-03-09
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value="vsm_evaluate_complaint",autoResultMap = true)
@ApiModel(value = "EvaluateComplaint", description = "评价投诉记录")
@AllArgsConstructor
public class EvaluateComplaint extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 用戶编号
     */
    @ApiModelProperty(value = "用戶编号")
    @Size(max = 255, message = "用戶编号长度不能超过255")
    @TableField(value = "user_number", condition = LIKE)
    @Excel(name = "用戶编号")
    private String userNumber;

    /**
     * 用户名称
     */
    @ApiModelProperty(value = "用户名称")
    @Size(max = 255, message = "用户名称长度不能超过255")
    @TableField(value = "user_name", condition = LIKE)
    @Excel(name = "用户名称")
    private String userName;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    @Size(max = 20, message = "手机号长度不能超过20")
    @TableField(value = "mobile", condition = LIKE,typeHandler = M9EncryptHandler.class)
    @Excel(name = "手机号")
    private String mobile;

    /**
     * 服务名称
     */
    @ApiModelProperty(value = "服务名称")
    @Size(max = 255, message = "服务名称长度不能超过255")
    @TableField(value = "service_name", condition = LIKE)
    @Excel(name = "服务名称")
    private String serviceName;

    /**
     * 1:评价 0投诉
     */
    @ApiModelProperty(value = "1:评价 0投诉")
    @TableField(value = "evaluate_type")
    @Excel(name = "1:评价 0投诉")
    private Integer evaluateType;

    /**
     * 评价内容
     */
    @ApiModelProperty(value = "评价内容")
    @Size(max = 255, message = "评价内容长度不能超过255")
    @TableField(value = "content", condition = LIKE)
    @Excel(name = "评价内容")
    private String content;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    @Size(max = 255, message = "地址长度不能超过255")
    @TableField(value = "ip_address", condition = LIKE)
    @Excel(name = "地址")
    private String ipAddress;

    /**
     * 评价时间
     */
    @ApiModelProperty(value = "评价时间")
    @TableField(value = "evaluate_time")
    @Excel(name = "评价时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime evaluateTime;

    /**
     * 0：零分 1:一分 2：二分 3：三分 4:四分 5：五分
     */
    @ApiModelProperty(value = "0：零分 1:一分 2：二分 3：三分 4:四分 5：五分")
    @TableField(value = "score")
    @Excel(name = "0：零分 1:一分 2：二分 3：三分 4:四分 5：五分")
    private Integer score;

    /**
     * 0:未回复 1：回复
     */
    @ApiModelProperty(value = "0:未回复 1：回复")
    @TableField(value = "is_reply")
    @Excel(name = "0:未回复 1：回复")
    private Integer isReply;

    /**
     * 回复内容
     */
    @ApiModelProperty(value = "回复内容")
    @Size(max = 255, message = "回复内容长度不能超过255")
    @TableField(value = "reply_content", condition = LIKE)
    @Excel(name = "回复内容")
    private String replyContent;

    /**
     * 服务商id
     */
    @ApiModelProperty(value = "服务商id")
    @TableField(value = "service_provider_id")
    @Excel(name = "服务商id")
    private Long serviceProviderId;

    /**
     * 展会id
     */
    @ApiModelProperty(value = "展会id")
    @TableField(value = "exhibition_manage_id")
    @Excel(name = "展会id")
    private Long exhibitionManageId;

    /**
     * 服务id
     */
    @ApiModelProperty(value = "服务id")
    @TableField(value = "service_id")
    @Excel(name = "服务id")
    private Long serviceId;

    /**
     * 规格id
     */
    @ApiModelProperty(value = "规格id")
    @TableField(value = "service_spec_id")
    @Excel(name = "规格id")
    private Long serviceSpecId;

    /**
     * 分类id
     */
    @ApiModelProperty(value = "分类id")
    @TableField(value = "service_category_id")
    @Excel(name = "分类id")
    private Long serviceCategoryId;

    /**
     * 被评级服务商id
     */
    @ApiModelProperty(value = "被评级服务商id")
    @TableField(value = "evaluate_service_provider_id")
    @Excel(name = "被评级服务商id")
    private Long evaluateServiceProviderId;


    @Builder
    public EvaluateComplaint(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    String userNumber, String userName, String mobile, String serviceName, Integer evaluateType, String content, 
                    String ipAddress, LocalDateTime evaluateTime, Integer score, Integer isReply, String replyContent, Long serviceProviderId, 
                    Long exhibitionManageId, Long serviceId, Long serviceSpecId, Long serviceCategoryId, Long evaluateServiceProviderId) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.userNumber = userNumber;
        this.userName = userName;
        this.mobile = mobile;
        this.serviceName = serviceName;
        this.evaluateType = evaluateType;
        this.content = content;
        this.ipAddress = ipAddress;
        this.evaluateTime = evaluateTime;
        this.score = score;
        this.isReply = isReply;
        this.replyContent = replyContent;
        this.serviceProviderId = serviceProviderId;
        this.exhibitionManageId = exhibitionManageId;
        this.serviceId = serviceId;
        this.serviceSpecId = serviceSpecId;
        this.serviceCategoryId = serviceCategoryId;
        this.evaluateServiceProviderId = evaluateServiceProviderId;
    }

}
